<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
		<script>
			var username="eaczt";
			var rightpwd="666666";
			var rightcode=Math.floor(Math.random()*9000+1000);
			
			var inputname=prompt("请您输入您的名字：")
			if(username==inputname){
				var inputpwd=prompt("请您输入密码：")
				if(rightpwd==inputpwd){
					var inputcode=prompt("请您输入验证码："+rightcode)
					 if(rightcode==inputcode){
					 	alert("登录成功")
					 }
					 else{
					 	alert("验证码有误")
					 }
				}
				else{
					alert("密码错误")
				}
			}
			else{
				alert("用户名错误")
			}
		</script>
	</body>
</html>
